<%@ page import="cn.manager.travel.domain.New" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.manager.travel.service.ClientService" %>
<%@ page import="cn.manager.travel.service.impl.ClientServiceImpl" %>
<%@ page import="cn.manager.travel.domain.Major" %>
<%@ page import="cn.manager.travel.domain.Teacher" %>
<%@ page import="cn.manager.travel.domain.Laboratory" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html class="no-js" lang="zxx">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Newpress - Blog HTML Template</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico">
    <!-- Place favicon.ico in the root directory -->

    <!-- CSS here -->
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/animate.min.css">
    <link rel="stylesheet" href="./css/magnific-popup.css">
    <link rel="stylesheet" href="./fontawesome/css/all.min.css">
    <link rel="stylesheet" href="./font-flaticon/flaticon.css">
    <link rel="stylesheet" href="./css/dripicons.css">
    <link rel="stylesheet" href="./css/slick.css">
    <link rel="stylesheet" href="./css/meanmenu.css">
    <link rel="stylesheet" href="./css/default.css">
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/responsive.css">
</head>
<body>

<!-- header -->
<header class="header-area header-area2">
    <div id="header-sticky" class="menu-area">
        <div class="container">
            <div class="second-menu">
                <div class="row align-items-center">
                    <div class="col-xl-2 col-lg-2">
                        <div class="logo">
                            <a href="index.jsp"><img src="img/logo.png" alt="logo"></a>
                        </div>
                    </div>
                    <div class="col-xl-8 col-lg-7">

                        <div class="main-menu text-right text-xl-right">
                            <nav id="mobile-menu">
                                <ul>
                                    <li class="sub">
                                        <a href="index.jsp">首页</a>
                                    </li>
                                    <li class="sub">
                                        <a href="#news">新闻介绍</a>
                                    </li>
                                    <li class="sub">
                                        <a href="#majors">专业介绍</a>
                                    </li>
                                    <li class="sub">
                                        <a href="#teachers">教师团队</a>
                                    </li>
                                    <li class="sub">
                                        <a href="javascritp:void(0)">就业指南</a>
                                    </li>
                                    <li class="sub">
                                        <a href="#laboratory">实验室</a>
                                    </li>
                                </ul>
                            </nav>
                        </div>

                    </div>

                    <div class="col-12">
                        <div class="mobile-menu"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<!-- header-end -->
<!-- offcanvas-area -->
<div class="offcanvas-menu">
    <span class="menu-close"><i class="fas fa-times"></i></span>
    <form role="search" method="get" id="searchform" class="searchform" action="http://wordpress.zcube.in/xconsulta/">
        <input type="text" name="s" id="search" value="" placeholder="Search"/>
        <button><i class="fa fa-search"></i></button>
    </form>


    <div id="cssmenu2" class="menu-one-page-menu-container">
        <ul id="menu-one-page-menu-1" class="menu">
            <li class="menu-item menu-item-type-custom menu-item-object-custom"><a
                    href="#home"><span>+8 12 3456897</span></a></li>
            <li class="menu-item menu-item-type-custom menu-item-object-custom"><a href="#howitwork"><span>info@example.com</span></a>
            </li>
        </ul>
    </div>
</div>
<div class="offcanvas-overly"></div>

<main>

    <section class="top-store-post-area pt-90 pb-60 fix" id="news" style="background: #f3f8fb;">
        <div class="container">
            <div class="row">
                <div class="col-sm-12 col-md-12 col-lg-12">
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="section-title mb-50">
                                <h2>
                                    新闻列表
                                </h2>

                            </div>

                        </div>
                        <div class="col-lg-6">
                            <div class="section-title text-right mt-10">
                                <a href="${pageContext.request.contextPath}/client/showNewList">查看全部 <i class="fal fa-long-arrow-right"></i></a>
                            </div>
                        </div>
                    </div>
                    <%
                        ClientService clientService = new ClientServiceImpl();
                        List<New> list = clientService.showNews(6);
                        request.getSession().setAttribute("news",list);
                    %>
                    <div class="row">
                        <c:forEach items="${news}" var="item">
                            <div class="col-lg-4 col-md-12">
                                <div class="tps-box wow fadeInUp animated hover-zoomin mb-30" data-delay=".4s">
                                    <div class="img ">
                                        <img src="img/1_1.png" alt="icon01">
                                    </div>
                                    <div class="text">
                                        <h5><a href="${pageContext.request.contextPath}/client/showNew?nID=${item.nID}">${item.title}</a></h5>
                                        <div class="post-tags mt-20">
                                            <ul>
                                                <li><a href="${pageContext.request.contextPath}/client/showNew?nID=${item.nID}"><span class="icon"><i class="fal fa-user-crown"></i></span>
                                                    ${item.author}</a></li>
                                                <li><a href="${pageContext.request.contextPath}/client/showNew?nID=${item.nID}"><span class="icon"><i class="fal fa-clock"></i></span>
                                                ${item.date}</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </c:forEach>
                    </div>

                </div>

            </div>
        </div>
    </section>


    <section class="recent-post-area pt-90 pb-60 fix" id="majors">
        <div class="container">
            <div class="row">
                <%
                    List<Major> majors = clientService.showMajors(4);
                    request.getSession().setAttribute("majors",majors);
                %>
                <div class="col-sm-12 col-md-12 col-lg-12">
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="section-title mb-50">
                                <h2>
                                    专业介绍
                                </h2>
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="section-title text-right mt-10">
                                <a href="${pageContext.request.contextPath}/client/showMajorList">更多 <i class="fal fa-long-arrow-right"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <c:forEach items="${majors}" var="major">
                            <div class="col-lg-6 col-md-12">
                                <div class="rp-box wow fadeInUp animated hover-zoomin mb-30" data-delay=".4s">
                                    <div class="img ">
                                        <img src="img/${major.image}" alt="icon01">
                                    </div>
                                    <div class="text">
                                        <div class="cat">${major.mName}</div>
                                        <h5><a href="${pageContext.request.contextPath}/client/showMajor?mID=${major.mID}">${major.mName}</a></h5>
                                    </div>
                                </div>
                            </div>
                        </c:forEach>

                    </div>

                </div>
            </div>
        </div>
    </section>

    <section id="teachers" class="editor-choice-area pt-90 pb-60 fix" style="background: #f3f8fb;">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="section-title center-align mb-50">
                        <h2>
                            教师团队
                        </h2>
                    </div>
                </div>
            </div>
            <%
                List<Teacher>  teachers= clientService.showTeachers();
                request.getSession().setAttribute("teachers",teachers);
            %>
            <div class="row home-blog-active">
                <c:forEach items="${teachers}" var="teacher">
                    <div class="col-lg-4 col-md-12">

                        <div class="fp-box wow fadeInUp animated hover-zoomin mb-30" data-delay=".4s">
                            <div class="img ">
                                <div class="cat">${teacher.tName}</div>
                                <img src="/img/${teacher.image}" alt="icon01">
                            </div>
                            <div class="text">
                                <h5><a href="${pageContext.request.contextPath}/client/showTeacher?tID=${teacher.tID}">${teacher.tName}</a></h5>
                                <div class="post-tags mt-20">
                                    <ul>
                                        <li><a href="#"><span class="icon"><i class="fal fa-clock"></i></span>${teacher.create}</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>
    </section>

    <section id="laboratory" class="editor-choice-area pt-90 pb-60 fix" style="background: #f3f8fb;">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="section-title center-align mb-50">
                        <h2>
                            实验室
                        </h2>
                    </div>
                </div>
            </div>
            <%
                List<Laboratory> laboratories = clientService.showLaboratories();
                request.getSession().setAttribute("laboratories",laboratories);
            %>
            <div class="row home-blog-active">
                <c:forEach items="${laboratories}" var="laboratorie">
                    <div class="col-lg-4 col-md-12">

                        <div class="fp-box wow fadeInUp animated hover-zoomin mb-30" data-delay=".4s">
                            <div class="img ">
                                <div class="cat">${laboratorie.lName}</div>
                                <img src="/img/${laboratorie.image}" alt="icon01">
                            </div>
                            <div class="text">
                                <h5><a href="${pageContext.request.contextPath}/client/showLaboratory?lID=${laboratorie.lID}">${laboratorie.lName}</a></h5>
                            </div>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>
    </section>


</main>
<footer class="footer-bg footer-p fix">
    <div class="copyright-wrap">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-12" style="text-align: center;">
                    东北林业大学版权所有  中国 黑龙江哈尔滨市香坊区和兴路26号  邮编  150040
                </div>
            </div>
        </div>
    </div>
</footer>

<script src="./js/vendor/modernizr-3.5.0.min.js"></script>
<script src="./js/vendor/jquery-3.6.0.min.js"></script>
<script src="./js/popper.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/one-page-nav-min.js"></script>
<script src="./js/slick.min.js"></script>
<script src="./js/ajax-form.js"></script>
<script src="./js/paroller.js"></script>
<script src="./js/wow.min.js"></script>
<script src="./js/js_isotope.pkgd.min.js"></script>
<script src="./js/imagesloaded.min.js"></script>
<script src="./js/parallax.min.js"></script>

<script src="./js/jquery.counterup.min.js"></script>
<script src="./js/jquery.scrollUp.min.js"></script>
<script src="./js/jquery.meanmenu.min.js"></script>
<script src="./js/parallax-scroll.js"></script>
<script src="./js/jquery.magnific-popup.min.js"></script>
<script src="./js/element-in-view.js"></script>
<script src="./js/main.js"></script>
</body>

</html>